const app = getApp(),url = app.globalData.url;
Page({

  /**
   * 页面的初始数据
   */
  data: {
    num:0,//最多添加五条
    optionslist:[],
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    
  },
  onShow(){
    var that = this
    var uid = wx.getStorageSync('user_massage')
    wx.request({
      url:url+'cvJobIntention/getJobIntent',
      method: "GET",
      data:{
        user_uid:uid.userUid
      },
      success(res){
        var resData = res.data
        if(resData.code != 200){
          return
        }
        if(!resData.data || !resData.data.length){
          return
        }
        that.setData({optionslist: resData.data, num: resData.data.length})
      }
    })
  },



  edit_yixiang(e){
    let id= e.currentTarget.dataset.id
    wx.navigateTo({
      url: '/HomePage/addyx/addyx?id='+ id,
    })
  },
  add_yixiang(){
    wx.navigateTo({
      url: '/HomePage/addyx/addyx',
    })
  },
})